#ifndef _refine_smooth_ea_h_
#define _refine_smooth_ea_h_

#include "types.h"

namespace refine {

namespace smooth_ea {

struct params {
	int fore_depth; ///< depth of unknown region in the preliminary foreground area: 1, 2, 3, ...
	int back_depth; ///< depth of unknown region in the preliminary background area: 1, 2, 3, ...
	int whs; //smooth window half-size: 1, 2, 3, ...
	int passes_num; //top bound: 1, 2, 3, ...
	float max_condition_number; // should be greater than 1
	bool silent;
};

extern params const default_params;

void perform(
	const byte_image & src, 
	const bit_mask::mask & m, 
	grey_mask::mask & matte, 
	const params & p = default_params);

//in this version grey_mask already has initial mask approximation
void perform(
	const byte_image & src, 
	grey_mask::mask & matte, 
	const params & p = default_params);

//initial mask aproximation in the alpha channel of the image
void perform(
	byte_image & im, 
	const params & p = default_params);

void perform(
	argb_byte_image & im, 
	const params & p = default_params);

} //namespace smooth_ea

} //namespace refine

#endif //_refine_smooth_ea_h_
